<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
<script type="text/javascript" src="../lib/My97DatePicker/4.8/WdatePicker.js"></script>
<title>财务管理</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>财务管理<span class="c-gray en">&gt;</span> 提现列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<form action="list" method="post" class="form form-horizontal" id="form-strategy-list">
		<div class="text-c" style="display:flex;align-items:center">
			<input type="text" class="input-text" style="width:250px" placeholder="手机号" id="tel" name="tel" value="${withdraw.tel }">
			&nbsp;&nbsp;&nbsp;
			<span>提现渠道：</span>
			<span class="select-box" style="width:250px">
				  <select class="select" size="1" name="withdrawchannel" id="withdrawchannel">
				    <option value="" selected>请选择</option>
				    <option value="1" <c:if test="${withdraw.withdrawchannel==1 }">selected=selected</c:if> >微信</option>
				    <option value="2" <c:if test="${withdraw.withdrawchannel==2 }">selected=selected</c:if> >支付宝</option>
				    <option value="3" <c:if test="${withdraw.withdrawchannel==3 }">selected=selected</c:if> >银行卡</option>
				  </select>
			</span>
			
			<span>审核状态：</span>
			<span class="select-box" style="width:250px">
				  <select class="select" size="1" name="status" id="status">
				    <option value="" selected>请选择</option>
				    <option value="1" <c:if test="${withdraw.status==1 }">selected=selected</c:if> >审核成功</option>
				    <option value="2" <c:if test="${withdraw.status==2 }">selected=selected</c:if> >审核被拒</option>
				    <option value="3" <c:if test="${withdraw.status==3 }">selected=selected</c:if> >已兑付</option>
				    <option value="4" <c:if test="${withdraw.status==4 }">selected=selected</c:if> >拒绝兑付</option>
				  </select>
			</span>
			<div class="text-c"> 申请时间：
				<input type="text" onfocus="WdatePicker()" id="starttime" name="starttime"  value="${withdraw.starttime }" class="input-text Wdate" style="width:120px;">
				-
				<input type="text" onfocus="WdatePicker()" id="endtime" name="endtime"  value="${withdraw.endtime }" class="input-text Wdate" style="width:120px;">
			</div>
			<button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i>搜索</button>
		</div>
		
	</form>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
		<span class="l">
		<c:if test="${button166t171t16}">
			<a href="#" onclick="exportreport()" class="btn btn-success radius">
				<i class="Hui-iconfont">&#xe645;</i> 导出
			</a>
		</c:if> 
		</span> 
		<span class="r">共有数据：<strong>${fn:length(withdrawList) }</strong> 条</span> 
	</div>
	<br/>
	
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr>
				<th scope="col" colspan="15">审核列表</th>
			</tr>
			<tr class="text-c">
				<th width="25"><input type="checkbox" name="" value=""></th>
				<th width="40">序号</th>
				<th width="40">姓名</th>
				<th width="40">手机号</th>
				<th width="40">提现积分</th>
				<th width="40">提现渠道</th>
				<th width="40">姓名</th>
				<th width="40">账号</th>
				<th width="40">银行支行名称</th>
				<th width="40">税点</th>
				<th width="40">税费</th>
				<th width="40">支付金额</th>
				<th width="40">审核状态</th>
				<th width="40">申请时间</th>
				<th width="40">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:set var="sum" value="0"></c:set>
			<c:forEach var="withdraw" items="${withdrawList }" varStatus="index">
			<tr class="text-c">
				<td><input type="checkbox" value="${withdraw.id }" name="boxids"></td>
				<td>${index.index+1 }</td>
				<td>${withdraw.nickname }</td>
				<td><a href="#" onclick="saledetail('${withdraw.memberid }')">${withdraw.tel }</a></td>
				<td>${withdraw.withdrawintegral }</td>
				<td>
					<c:if test="${withdraw.withdrawchannel  == 1}">
						微信
					</c:if>
					<c:if test="${withdraw.withdrawchannel  == 2}">
						支付宝
					</c:if>
					<c:if test="${withdraw.withdrawchannel  == 3}">
						银行卡
					</c:if>
				</td>
				<td>${withdraw.name }</td>
				<td>${withdraw.account }</td>
				<td>${withdraw.bank }</td>
				<td>${withdraw.taxpoint }</td>
				<td>${withdraw.taxation }</td>
				<td>${withdraw.payamount }</td>
				<td><c:if test="${withdraw.status  == 0}">
						申请中
					</c:if>
					<c:if test="${withdraw.status  == 1}">
						审核通过
					</c:if>
					<c:if test="${withdraw.status  == 2}">
						审核被拒
					</c:if>
					<c:if test="${withdraw.status  == 3}">
						已兑付
					</c:if>
					<c:if test="${withdraw.status  == 4}">
						拒绝兑付
					</c:if>
				</td>
				<td><fmt:formatDate type="both" dateStyle="medium" timeStyle="medium" value="${withdraw.createtime }" /></td>
				<td>
				<c:if test="${button166t171t15}">
					<c:if test="${withdraw.status  == 0}">
						<a title="审核" href="javascript:;" onclick="activation1('审核','activationbefore1?forwardflag=upd&id=${withdraw.id}')" class="ml-5" style="text-decoration:none">
							<i class="btn btn-primary radius">审核</i>
						</a>
					</c:if>
				</c:if>
				<c:if test="${button166t171t13}">
					<c:if test="${withdraw.status  == 1}">
						<a title="兑付" href="javascript:;" onclick="activation2('兑付','activationbefore2?forwardflag=upd&id=${withdraw.id}')" class="ml-5" style="text-decoration:none">
							<i class="btn btn-warning radius">兑付</i>
						</a>
					</c:if>
				</c:if>
				<c:if test="${button166t171t12}">
					<c:if test="${withdraw.status  > 0}">
					<a title="查看" href="javascript:;" onclick="showJournal('${withdraw.id }')" class="ml-5" style="text-decoration:none">
						<i class="btn btn-warning radius">查看</i>
					</a>
					</c:if>
				</c:if>
				<c:if test="${button166t171t14}">
					<a title="查看流水" href="javascript:;" onclick="showStream('${withdraw.memberid }')" class="ml-5" style="text-decoration:none">
						<i class="btn btn-warning radius">查看流水</i>
					</a>
				</c:if>
				</td>
			</tr>
			<c:set var="sum" value="${sum+withdraw.withdrawintegral}"></c:set>
			</c:forEach>
		</tbody>
		
	</table>
	<table>
		<tr><td width="50%"></td><td>积分合计：${sum }</td></tr>
	</table>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="../lib/My97DatePicker/4.8/WdatePicker.js"></script>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript">
$('.table-sort').dataTable({                         
	"aaSorting": [[ 1, "asc" ]],//默认第几个排序
	"searching":false,//搜索输入框显示
	"aoColumnDefs": [
	  {"orderable":false,"aTargets":[2,0]},// 制定列不参与排序
	  {"orderable":false,"aTargets":[2,2]},// 制定列不参与排序
	  {"orderable":false,"aTargets":[2,3]},// 制定列不参与排序
	]
});

function saledetail(memberid){
	layer_show("详情",'${ctx}/member/homepage1?memberid='+memberid,800,800);
}


/*
	参数解释：
	title	标题
	url		请求的url
	id		需要操作的数据id
	w		弹出层宽度（缺省调默认值）
	h		弹出层高度（缺省调默认值）
*/
/*通知公告-通知列表-一级审核*/
function activation1(title,url,w,h){
	layer_show(title,url,400,300);
} 
/*通知公告-通知列表-二级审核*/
function activation2(title,url,id,w,h){
	layer_show(title,url,400,300);
}

/*通知公告-通知列表-查看流水*/
function showStream(memberid){
	layer_show("查看流水",'${ctx}/order/list?memberid='+memberid,800,800);
}
 
/*通知公告-通知列表-查看审核日志*/
function showJournal(id){
	layer_show("审核日志",'${ctx}/order/list1?id='+id,800,400);
}
/*导出*/
function exportreport(){
		document.getElementById('form-strategy-list').action = "${ctx}/final/export";  
		document.getElementById("form-strategy-list").submit()
} 

</script>
</body>
</html>